/*

 @name    : 锅巴汉化 - Web汉化插件
 @author  : 麦子、JAR、小蓝、好阳光的小锅巴
 @version : V0.6.1 - 2019-07-09
 @website : http://www.g8hh.com

*/

//1.汉化杂项
var cnItems = {
    _OTHER_: [],

    //未分类：
    'Hire a doctor (': '雇佣医生 (',
    'Hire a doctor': '雇佣医生',
    'Infected': '被感染',
    'Pandemic Day': '流行日',
    'Recovered': '已恢复',
    'Welcome to COVID Containment!': '欢迎来到消灭新冠状肺炎！',
    'Yeeeeah, this isn\'t working. We\'re gonna need some more tools.': '是的，这不起作用。 我们将需要更多工具。',
    'This game is open source!': '该游戏是开源的！',
    'Admin': '管理：',
    'Deaths': '死亡数',
    'COVID Containment Dashboard': '消灭新冠肺炎仪表板',
    'Treat infected': '治疗感染',
    'Uninfected': '未感染',
    'Research bonus': '研究加成',
    'Research Level': '研究等级',
    'Research treatment': '研究治疗',
    'Reset': '重置',
    'Helps treat patients full-time': '帮助全职治疗患者',
    'how': '怎样',
    'Treat first patients': '治疗第一批患者',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '\n          Research Level': '研究等级',
    '\n          There are currently': '目前有',

    //原样
    '': '',
    '': '',

}


//需处理的前缀
var cnPrefix = {
    "(-": "(-",
    "(+": "(+",
    "(": "(",
    "-": "-",
    "+": "+",
    " ": " ",
    ": ": "： ",
}

//需处理的后缀
var cnPostfix = {
    ":": "：",
    "：": "：",
    ": ": "： ",
    "： ": "： ",
    " ": "",
    "/s)": "/s)",
    "/s": "/s",
    ")": ")",
    "%": "%",
}

//需排除的，正则匹配
var cnExcludeWhole = [
    /^x?\d+(\.\d+)?[A-Za-z%]{0,2}(\s.C)?\s*$/, //12.34K,23.4 °C
    /^x?\d+(\.\d+)?(e[+\-]?\d+)?\s*$/, //12.34e+4
    /^\s*$/, //纯空格
    /^\d+(\.\d+)?[A-Za-z]{0,2}.?\(?([+\-]?(\d+(\.\d+)?[A-Za-z]{0,2})?)?$/, //12.34M (+34.34K
    /^(\d+(\.\d+)?[A-Za-z]{0,2}\/s)?.?\(?([+\-]?\d+(\.\d+)?[A-Za-z]{0,2})?\/s\stot$/, //2.74M/s (112.4K/s tot
    /^\d+(\.\d+)?(e[+\-]?\d+)?.?\(?([+\-]?(\d+(\.\d+)?(e[+\-]?\d+)?)?)?$/, //2.177e+6 (+4.01+4
    /^(\d+(\.\d+)?(e[+\-]?\d+)?\/s)?.?\(?([+\-]?(\d+(\.\d+)?(e[+\-]?\d+)?)?)?\/s\stot$/, //2.177e+6/s (+4.01+4/s tot
];
var cnExcludePostfix = [
    /:?\s*x?\d+(\.\d+)?(e[+\-]?\d+)?\s*$/, //12.34e+4
    /:?\s*x?\d+(\.\d+)?[A-Za-z]{0,2}$/, //: 12.34K, x1.5
]

//正则替换，带数字的固定格式句子
//纯数字：(\d+)
//逗号：([\d\.,]+)
//小数点：([\d\.]+)
//原样输出的字段：(.+)
var cnRegReplace = new Map([
    [/^requires ([\d\.]+) more research points$/, '需要$1个研究点'],
    [/^(\d+) Royal points$/, '$1 皇家点数'],
    [/^Cost: (\d+) RP$/, '成本：$1 皇家点数'],
    [/^Usages: (\d+)\/$/, '用途：$1\/'],
    [/^workers: (\d+)\/$/, '工人：$1\/'],
    [/^\n(.+)You've treated$/, '你已经治愈了'],
    [/^patients, but this is\n(.+)clearly getting out of hand. Maybe doing a bit of research would help\n(.+)you be more effective?\n(.+)$/, '病人，但这显然是失控的。 也许做一些研究会帮助您变得更高效？'],
    [/^infected humans.\n(.+)And counting...\n(.+)$/, '被感染的人类.还在增加中...'],
    [/^to do that, but\n(.+)a complete lack of ability never stopped anyone else, so it won't stop\n(.+)you!\n(.+)$/, '这样做，但是，完全缺乏能力永远不会阻止其他任何人，所以它不会阻止您！'],
    [/^\n(.+)Your job is to erradicate the virus, COVID-19, before the entire world\n(.+)succumbs to it. You have no knowledge of$/, '您的工作是在全世界都屈服于它之前消灭COVID-19病毒。 你不知道'],
    [/^\n(.+)Got feedback? Want to contribute?\n(.+)$/, '想反馈？想贡献？'],
    [/^\n(.+)By the way, what\'s your name?\n(.+)$/, '顺便问一下你叫什么名字？'],
    [/^patients, but this is(.+)clearly getting out of hand. Maybe doing a bit of research would help(.+)you be more effective?(.+)$/, '病人，但这显然已经失控了。 也许做一些研究可以帮助您提高效率？'],

]);